/*
 * @FilePath: vite.config.ts
 * @Author: liuqiong
 * @Date: 2023-09-09 08:54:32
 * @LastEditors: yangxn 153159893@qq.com
 * @LastEditTime: 2024-11-28 15:17:43
 * @Description:
 */
import { fileURLToPath, URL } from 'node:url'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
// @ts-ignore
const base = process.cwd()
export default defineConfig(({ mode }) => {
  const envs = loadEnv(mode, base)
  return {
    base: envs.VITE_BASE_URL,
    plugins: [vue(), vueJsx()],
    resolve: {
      alias: {
        '@': fileURLToPath(new URL('./src', import.meta.url))
      }
    },
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: `@use "./src/assets/element/index.scss" as *;`
        }
      }
    },
    server: {
      proxy: {
        
      }
    }
  }
})
